package br.com.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conexao {

    public static final String host     = "dev.ct.utfpr.edu.br";
    public static final String port     = "5432";
    public static final String database = "aluno05";
    public static final String user     = "aluno05";
    public static final String password = "al09100";

    static{
          try {
                Class.forName("org.postgresql.Driver");
          } catch ( ClassNotFoundException exc ) {
             exc.printStackTrace();
        }
    }

    //método para pegar a conexão passando o servidor, usuário e senha
    public static Connection getConnection( String url,String usuario, String senha) throws SQLException{

        return DriverManager.getConnection( url, usuario, senha );

    }

}
